<?php 
if(checarUsuario()){ 
$login = $_SESSION['user'];
$sql_user = $conn->query("select * from usuario where login = '$login'");
$user = $sql_user->fetch(PDO::FETCH_ASSOC);
	?>
<script type="text/javascript" src="js/usuario.js"></script>
<h3 class="page-header">
	<b>Cadastro</b>
</h3>
<form action="model/usuario_alterar.php" method="POST">
	<div class="row">
		<div class="col-lg-5">
			<label class="control-label">Nome</label> <input type="text"
				class="form-control notBlank" name="nome" id="nome" value="<?php echo $user["nome"];?>" />
				<input type="hidden" 
				class="form-control notBlank" name="login" id="login" maxlength="10" value="<?php echo $login?>" />
		</div>
	</div>
	<div class="row">
		<div class="col-lg-5">
			<label class="control-label">Email</label> <input type="text"
				class="form-control notBlank email" name="email" id="email" value="<?php echo $user["email"];?>" />
		</div>
	</div>
	<div class="row">
		<div class="col-lg-3">
			<label class="control-label">Senha</label> <input type="password"
				class="form-control" name="senha" id="senha" onblur="confereSenha('senha','conf_senha');"/>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-3">
			<label class="control-label">Confirmar Senha</label> <input
				type="password" class="form-control" name="conf_senha"
				id="conf_senha" onblur="confereSenha('senha','conf_senha');" />
		</div>
	</div>
	<br/>
	<div class="row">
		<div class="col-lg-3">
			<input type="submit" class="btn btn-primary" value="Enviar"/>
			<input type="reset" class="btn btn-default" value="Limpar"/>
		</div>
	</div>
</form>
				<?php }else{
					$_SESSION['msg_erro'] = "Usuário não autorizado, contate o administrador.";
					echo '<script>window.location="index.php"</script>';
				}?>